{% extends 'base_right.html' %}
{% load blog_tags static %}
{% block title %}{{ object.title }}{% endblock title %}

{% block description %}
    <meta name="description" content="{{ object.summary }}"/>
{% endblock description %}
{% block keywords %}
    <meta name="keywords" content="{% get_article_keywords object %}"/>
{% endblock keywords %}

{% block body %}
    <div class="content-wrap">
        <div class="content">
            <div class="breadcrumbs">
                <a title="返回首页" href="/"><i class="fa fa-home"></i></a><small>></small>
                <a href="/category/{{ object.category.bigcategory.slug }}">{{ object.category.bigcategory.name }}</a>
                <small>></small>
                <a href="/category/{{ object.category.bigcategory.slug }}/{{ object.category.name|lower }}">{{ object.category.name }}</a>
                <small>></small> <span class="muted">{{ object.title }}</span>
            </div>
            <header class="article-header">
                <h1 class="article-title"><a href="/article/{{ object.slug }}">{{ object.title }}</a></h1>
                <div class="meta">
                    <span id="mute-category" class="muted">
                        <i class="fa fa-list-alt"></i>
                        <a href="category/technique/{{ object.category.name|lower }}"> {{ object.category.name }}</a>
                    </span>
                    <span class="muted">
                        <i class="fa fa-user"></i>
                        <a href="/author/{{ object.author.name }}">{{ object.author }}</a>
                    </span>
                    <time class="muted"><i class="fa fa-clock-o"></i> {{ object.create_date|date:'y-m-d' }}</time>
                    <span class="muted"><i class="fa fa-eye"></i> {{ object.views }}浏览</span>
                    <span class="muted">
                        <i class="fa fa-comments-o"></i>
                        <a href="/article/{{ object.slug }}#respond">0评论</a>
                    </span>
                </div>
            </header>
            <article class="article-content">
                {{ article.body|safe }}
                <p>转载请注明：
                    <a href="{% url 'blog:article' object.slug %}">二十三画生</a> &raquo;
                    <a href="{% url 'blog:article' object.slug %}">{{ object.title }}</a>
                </p>

                <div class="article-social">
                    <a href="javascript:;" data-action="ding" data-id="{{ object.id }}" id="Addlike" class="action">
                        <i class="fa fa-heart-o"></i>喜欢 (<span class="count">{{ object.loves }}</span>)
                    </a>
                    <span class="or">or</span>
                    <span class="action action-share bdsharebuttonbox"><i class="fa fa-share-alt"></i>分享 (
                                <span class="bds_count" data-cmd="count" title="累计分享0次">0</span>)
                                <div class="action-popover">
                                    <div class="popover top in">
                                        <div class="arrow"></div>
                                        <div class="popover-content">
                                            <a href="#" class="sinaweibo fa fa-weibo" data-cmd="tsina"
                                               title="分享到新浪微博"></a>
                                            <a href="#" class="bds_qzone fa fa-star" data-cmd="qzone"
                                               title="分享到QQ空间"></a>
                                            <a href="#" class="bds_github fa fa-github" data-cmd="github"
                                               title="分享到github"></a>
                                            <a href="#" class="bds_renren fa fa-qq" data-cmd="sqq" title="分享到QQ好友"></a>
                                            <a href="#" class="bds_renren fa fa-twitter" data-cmd="renren"
                                               title="分享到推特网"></a>
                                            <a href="#" class="bds_weixin fa fa-weixin" data-cmd="weixin"
                                               title="分享到微信"></a>
                                            <a href="#" class="bds_renren fa fa-facebook" data-cmd="weixin"
                                               title="分享到facebook"></a>
                                            <a href="#" class="bds_more fa fa-ellipsis-h" data-cmd="more"></a>
                                        </div>
                                    </div>
                                </div>
                            </span>
                </div>
            </article>
        </div>
        <footer class="article-footer">
            <!--文章标签-->
            <div class="article-tags">
                <i class="fa fa-tags"></i>
                {% get_article_tag object.id as tags %}
                {% for tag in tags %}..
                    <a href="{% url 'blog:tag' tag.name %}" rel="tag">{{ tag.name }}</a>
                {% endfor %}
            </div>
            <!--文章标签结束-->

        </footer>
        <!--推荐文章-->
        <nav class="article-nav">
                        <span class="article-nav-prev">
                            <i class="fa fa-angle-double-left"></i>
                            {% get_article_previous object.id as article_previous %}
                            <a href="{% url 'blog:article' article_previous.slug %}"
                               rel="prev">{{ article_previous.title }}</a>
                        </span>
            <span class="article-nav-next">
                            {% get_article_next object.id as article_next %}
                            <a href="{% url 'blog:article' article_next.slug %}"
                               rel="prev">{{ article_next.title }}</a>
                            <i class="fa fa-angle-double-right"></i>
                        </span>
        </nav>

        <div class="related_top">
            <div class="related_posts">
                <ul class="related_img">
                    {% get_category_article as  category_article %}
                    {% for article in category_article.article_2 %}
                        <li class="related_box">
                            <a href="{% url 'blog:article' article.slug %}" title="{{ article.title }}"
                               target="_blank">
                                <img src="{{ article.img_link }}" alt="{{ article.title }}" width="50%" ><br>
                                <span class="r_title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ article.title }}
                                  </span></a>
                        </li>
                    {% endfor %}
                </ul>

                <div class="relates">
                    <ul>
                        {% for article in category_article.article_8 %}
                            <li>
                                <i class="fa fa-minus"></i>
                                <a href="{% url 'blog:article' article.slug %}">{{ article.title }}</a>
                            </li>
                        {% endfor %}
                    </ul>
                </div>
            </div>
        </div>

        {% include 'comment_list.html' %}
    </div>
    </div>
{% endblock body %}
